﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Controls;

namespace TFSWordAddIn
{
    public partial class PickWorkItems : Form
    {
        PickWorkItemsControl _picker;

        public PickWorkItems()
        {
            InitializeComponent();
        }

        WorkItemStore _workItemStore;
        public WorkItemStore WorkItemStore
        {
            get
            {
                return _workItemStore;
            }
            set
            {
                _workItemStore = value;
                _picker = new PickWorkItemsControl(this.WorkItemStore);
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            _picker.Dock = DockStyle.Fill;

            this.Controls.Add(_picker);

        }

        public List<int> ExcludedWorkItemIds
        {
            get
            {
                return _picker.ExcludedWorkItemIds;
            }
        }

        public List<WorkItem> SelectedWorkItems()
        {
            return _picker.SelectedWorkItems();
        }
    }
}
